Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dream logic #9

Merged
merged 31 commits into from
Sep 9, 2024
Merged

Dream logic #9

merged 31 commits into from
Sep 9, 2024

Conversation

janezg-SLAC
Copy link
Contributor

Description

Motivation and Context

How Has This Been Tested?

Where Has This Been Documented?

Screenshots (if appropriate):

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive comments
  • Test suite passes locally
  • Libraries are set to fixed versions and not Always Newest
  • Code committed with pre-commit (alternatively pre-commit run --all-files)

@janezg-SLAC janezg-SLAC requested a review from jyin999 May 3, 2024 16:01
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"DREAM_NC_GCC_01.IG.rPRESS < 1.0E-5 AND
DREAM_DP1_GHC_01.IG.xPRESS_OK AND DREAM_DP1_GHC_01.IG.rPRESS < 1.0E-5;" If the at_vac setpoint will likely change during operation, we should make it user-configurable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic should be: VRC_02 can be closed only when VRC_01 is open. so we only need to do is: set the VRC_02_ILK := VRC_01.i_xOpnLS, and pass it to the VRC_02 function.

//Close DP1_VRC_02 if DP1_VRC_01 is opened
"IF DREAM_DP1_VRC_01.iq_stValve.i_xOpnLS THEN
DREAM_DP1_VRC_02.M_Set_CLS_SW(TRUE);
END_IF
DREAM_DP1_VRC_02(i_xExtILK_OK := bDP1_VRC_02_ILK, i_xOverrideMode := bSystemOverrideMode); //Normally open valve"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using pumpRUNNING estate instead of atSpeed. Since eState is evaluated more strictly: iq_stPtm.i_xAtSpd AND iq_stPtm.q_RunDO THEN iq_stPtm.eState := pumpRUNNING;

"DREAM_MC_GHC.IG_CH1.rPRESS < 1.0E-8 AND
DREAM_CAT1_PTM_01.iq_stPtm.i_xAtSpd AND
DREAM_CAT2_PTM_01.iq_stPtm.i_xAtSpd;"

Copy link
Contributor

@jyin999 jyin999 Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add interlock to the turbopumps estate: pumps are not running.
DREAM_ROUGH1_VFV_02(i_xExtIlkOK := DREAM_ROUGH1_VRC_01.iq_stValve.i_xClsLS AND DREAM_DP1_VRC_01.iq_stValve.i_xClsLS);

DREAM_ROUGH2_VFV_02(i_xExtIlkOK := DREAM_ROUGH2_VRC_01.iq_stValve.i_xClsLS);
DREAM_ROUGH2_VFV_03(i_xExtIlkOK := DREAM_ROUGH2_VRC_02.iq_stValve.i_xClsLS AND DREAM_CAT1_VRC_01.iq_stValve.i_xClsLS);

jyin999
jyin999 previously approved these changes Sep 6, 2024
@janezg-SLAC
Copy link
Contributor Author

@jyin999 Please review the changes and approve. Thanks

@janezg-SLAC janezg-SLAC merged commit 5ebc433 into pcdshub:master Sep 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants